package com.vchello.bean.user;

import java.io.Serializable;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.vchello.bean.lib.Field;

/**
 * 
 * @author power
 * 用户领域
 */
@TableName("user_field")
public class UserField extends Model<UserField> {

	private static final long serialVersionUID = 1L;

	@TableId("id")
	private int id;
	
	@TableField("field_id")
	private int fieldId;

	@TableField("sort")
	private int sort;

	@TableField("user_id")
	private int userId;

	@TableField(exist = false)
	private Field filed;

	@TableField(exist = false)
	private User user;

	public UserField() {
		super();
	}

	public UserField(int fieldId, int sort, int userId) {
		super();
		this.fieldId = fieldId;
		this.sort = sort;
		this.userId = userId;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getFieldId() {
		return fieldId;
	}

	public void setFieldId(int fieldId) {
		this.fieldId = fieldId;
	}

	public Field getFiled() {
		return filed;
	}

	public void setFiled(Field filed) {
		this.filed = filed;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}